package com.pucong.gitee.database.backup.common.entity.redis;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pucong.gitee.database.backup.common.selfenum.CommonBoolenEnum;
import com.pucong.gitee.database.backup.common.selfenum.DatabaseTypeEnum;
import com.pucong.gitee.database.backup.common.selfenum.DatabaseVersionEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("AUTO_REDIS_CONNECT_INFO")
@ApiModel("redis 连接信息表")
public class AutoRedisInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "UUID",type = IdType.INPUT)
    @ApiModelProperty("主键")
    private String uuid;

    @NotBlank
    @TableField("TEXT")
    @ApiModelProperty("连接名称")
    private String text;

    @TableField("RHOST")
    @ApiModelProperty("IP地址")
    private String rHost;

    @TableField("RPORT")
    @ApiModelProperty(value = "端口号",example = "1")
    private Integer rPort;

    @TableField("RPASS")
    @ApiModelProperty("密码")
    private String rPass;

    @TableField("SNAME")
    @ApiModelProperty("连接名")
    private String sName;

    @TableField("SHOST")
    @ApiModelProperty("IP地址")
    private String sHost;

    @TableField("SPORT")
    @ApiModelProperty(value = "ssh端口",example = "1")
    private Integer sPort;

    @TableField("SPASS")
    @ApiModelProperty("ssh密码")
    private String sPass;

    @TableField("SPKEY")
    @ApiModelProperty("ssh登录私钥")
    private String sPkey;

    @TableField("ONSSL")
    @ApiModelProperty("是否启用ssl")
    private CommonBoolenEnum onSsl;

    @TableField("ISHA")
    @ApiModelProperty("是否集群：0单机，1集群")
    private CommonBoolenEnum isHa;

    @TableField("CONNECT_TYPE")
    @ApiModelProperty("类型：0默认，1：ssh")
    private CommonBoolenEnum connectType;

    @TableField("CREATE_BY")
    @ApiModelProperty("创建人")
    private String createBy;

    @TableField("CREATE_TIME")
    @ApiModelProperty("创建时间")
    private Date createTime;
}
